<template>
  <div class="page">
    <div class="list_box" style="top:0">
      <van-list v-model="loading" :finished="finished" @load="getList">
        <div v-for="(item,index) in list" :key="index" class="list_item list_item1">
            <div class="titBox">
              <div class="tit">{{item.name}}</div>
              <span class="listLabel listLabel_3" v-if="item.status=='未通过'">{{item.status}}</span>
              <span class="listLabel listLabel_1" v-if="item.status=='已通过'">{{item.status}}</span>
            </div>
            <p>{{item.type}}</p>
            <p>{{item.created_at}}</p>
        </div>
        <div class="finished" v-if="finished">加载完毕</div>
      </van-list>
    </div>
  </div>
</template>

<script>
import { Dialog } from "vant";
export default {
  data() {
    return {
      title:"",
      list: [],
      loading: false,
      finished: false
    };
  },
  mounted: function() {
    this.getList()
    maxusJSB.tojson({title:"认证课程",left:"关闭"})
  },
  methods: {
    // 请求列表
    getList() {
      this.$http
        .get("?key=&request=front&operation=record-cert-list&client=1&by=admin&user_id="+this.getUserID+"&_="+Date.parse(new Date()))
        .then(response => {
          if(response.ret==1){
            this.list=response.data
            this.finished=true
            this.loading=false
          }
        });
    }
  }
};
</script>